<template>
  <van-text-ellipsis
    :collapse-text="collapseText"
    :content="content"
    :expand-text="expandText"
    :rows="rows"
    @click-action="clickAction"
  />
</template>

<script lang="ts" setup>
const props = withDefaults(
  defineProps<{
    content: string
    rows?: string
    collapseText?: string
    expandText?: string
  }>(),
  {
    rows: '1',
    collapseText: '收起',
    expandText: '展开'
  }
)
const { content, rows, collapseText, expandText } = toRefs(props)

const clickAction = (event: MouseEvent) => {
  event.stopPropagation()
}
</script>
